<ol class="breadcrumb">
    <li><a href="#">一元中奖</a></li>
    <li><a href="/activity/list">活动管理</a></li>
    <li>编辑活动</li>
</ol>
<div class="panel panel-default">
    <div class="panel-heading">
        <span class="glyphicon glyphicon-pencil"></span>
        <span class="panel-title">请填写活动信息</span>
    </div>
    <div class="panel-body">
        <form action="/activity/edit" method="post" enctype="multipart/form-data" class="form-horizontal" role="form"
              style="padding-top: 15px;">

            <div class="form-group">
                <label for="firstname" class="col-sm-2 control-label">活动名称</label>

                <div class="col-sm-10">
                    <input type="text" class="form-control" id="name" name="name" value="<%= activity.name %>"
                           placeholder="请输入">
                </div>
            </div>

            <div class="form-group">
                <label for="lastname" class="col-sm-2 control-label">活动地址</label>

                <div class="col-sm-10">
                    <input type="text" class="form-control" id="description" name="url" value="<%= activity.url %>"
                           placeholder="请输入">
                </div>
            </div>

            <div class="form-group">
                <label for="lastname" class="col-sm-2 control-label">描述</label>

                <div class="col-sm-10">
                    <input type="text" class="form-control" id="description" name="description"
                           value="<%= activity.description %>"
                           placeholder="请输入">
                </div>
            </div>

            <div class="form-group">
                <label for="lastname" class="col-sm-2 control-label">商品主图</label>

                <div class="col-sm-10">
                    <label class="sr-only" for="inputfile">文件输入</label>
                    <input type="file" id="inputfile" name="thumb" class="form-control">
                    <input id="thumb" name="oldthumb" value="<%= activity.thumb %>" style="display: none;"/>
                    <input id="activity" name="id" value="<%= activity.id %>" style="display: none;"/>
                    <div class="goods_img thumbnail" style="background-image: url('<%= activity.thumb %>');"></div>
                </div>

            </div>

            <div class="form-group">
                <label for="lastname" class="col-sm-2 control-label">是否微信显示</label>

                <div class="col-sm-10">
                    <label class="checkbox-inline">
                        <input type="radio" name="isView" id="status1"
                               value="0" checked>是
                    </label>
                    <label class="checkbox-inline">
                        <input type="radio" name="isView" id="status2"
                               value="1">否
                    </label>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-2">
                    <button type="submit" class="btn btn-success btn-block">确认提交</button>
                </div>
            </div>
        </form>
    </div>
</div>
<style>
    .goods_img {
        width: 30%;
        float: left;
        /*background-image: url("http://123.57.72.99:3000/images/goods/5881b28b2f6e8730d409a251e83c9a0f.jpg");*/
        background-repeat: no-repeat;
        background-size: cover;
        height: 80px;
        width: 80px;
        margin: 10px 10px 10px 0px;
    }
</style>